﻿<Page
    x:Class="Metro_Calc.BlankPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Metro_Calc"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid x:Name="AppGrid">
        <Grid.RowDefinitions>
            <RowDefinition Height="30" />
            <RowDefinition Height="80" />
            <RowDefinition Height="1*" />
        </Grid.RowDefinitions>

        <!--
         Ausgabefelder
         -->
        <TextBlock Grid.Row="0" x:Name="CalcType" HorizontalAlignment="Right" Width="20" Height="30" Margin="0,0,2,0" TextWrapping="NoWrap" Text="" VerticalAlignment="Top" FontSize="26"/>
        <TextBlock Grid.Row="0" x:Name="CalcNumber" HorizontalAlignment="Right" Width="Auto" Height="30" Margin="0,0,25,0" TextWrapping="NoWrap" Text="" VerticalAlignment="Top" FontSize="26"/>
        <TextBlock Grid.Row="1" x:Name="CalcResult" HorizontalAlignment="Right" Width="Auto" Height="80" Margin="0" TextWrapping="NoWrap" Text="0" VerticalAlignment="Top" FontSize="76"/>

        <!--
         Eingabefelder
         -->
        <!-- Rechenzeichen -->
        <Button Click="ChangeOperandToAddition" Content="+" HorizontalAlignment="Right" Grid.Row="2" VerticalAlignment="Bottom" Width="75" Height="75" Margin="0,0,10,85" Background="#3F0000FF"/>
        <Button Click="ChangeOperandToSubtraction" Content="-" HorizontalAlignment="Right" Grid.Row="2" VerticalAlignment="Bottom" Width="75" Height="75" Margin="0,0,10,160" Background="#3F0000FF"/>
        <Button Click="ChangeOperandToMultiplication" Content="x" HorizontalAlignment="Right" Grid.Row="2" VerticalAlignment="Bottom" Width="75" Height="75" Margin="0,0,10,235" Background="#3F0000FF"/>
        <Button Click="ChangeOperandToDivision" Content="÷" HorizontalAlignment="Right" Grid.Row="2" VerticalAlignment="Bottom" Width="75" Height="75" Margin="0,0,10,310" FontSize="18" Background="#3F0000FF"/>
        <Button Click="AddSignDot" Content="." HorizontalAlignment="Right" Grid.Row="2" VerticalAlignment="Bottom" Width="75" Height="75" Margin="0,0,85,10" Background="#190000FF"/>
        <Button Content="%" HorizontalAlignment="Right" Grid.Row="2" VerticalAlignment="Bottom" Width="75" Height="75" Margin="0,0,85,310" Background="#3F0000FF"/>
        <Button Content="±" HorizontalAlignment="Right" Grid.Row="2" VerticalAlignment="Bottom" Width="75" Height="75" Margin="0,0,160,310" FontSize="18" Background="#3F0000FF"/>

        <!-- Funktionen -->
        <Button Click="Calculation" Content="=" HorizontalAlignment="Right" Grid.Row="2" VerticalAlignment="Bottom" Width="75" Height="75" Margin="0,0,10,10" Background="#7F0000FF"/>
        <Button Click="DeleteOne" Content="Õ" FontFamily="Wingdings" FontSize="18" HorizontalAlignment="Right" Grid.Row="2" VerticalAlignment="Bottom" Width="75" Height="75" Margin="0,0,235,310" Background="#3F0000FF"/>
        <Button Click="DeleteAll" Content="C" HorizontalAlignment="Right" Grid.Row="2" VerticalAlignment="Bottom" Width="75" Height="75" Margin="0,0,235,385" Background="#3F0000FF"/>
        <Button Content="MC" HorizontalAlignment="Right" Grid.Row="2" VerticalAlignment="Bottom" Width="75" Height="75" Margin="0,0,160,385" Background="#3F0000FF"/>
        <Button Content="MR" HorizontalAlignment="Right" Grid.Row="2" VerticalAlignment="Bottom" Width="75" Height="75" Margin="0,0,85,385" Background="#3F0000FF"/>
        <Button Content="M+" HorizontalAlignment="Right" Grid.Row="2" VerticalAlignment="Bottom" Width="75" Height="75" Margin="0,0,10,385" Background="#3F0000FF"/>

        <!-- Ziffern -->
        <Button Click="AddDigit0" Content="0" HorizontalAlignment="Right" Grid.Row="2" VerticalAlignment="Bottom" Width="150" Height="75" Margin="0,0,160,10" Background="#190000FF"/>
        <Button Click="AddDigit1" Content="1" HorizontalAlignment="Right" Grid.Row="2" VerticalAlignment="Bottom" Width="75" Height="75" Margin="0,0,235,85" Background="#190000FF"/>
        <Button Click="AddDigit2" Content="2" HorizontalAlignment="Right" Grid.Row="2" VerticalAlignment="Bottom" Width="75" Height="75" Margin="0,0,160,85" Background="#190000FF"/>
        <Button Click="AddDigit3" Content="3" HorizontalAlignment="Right" Grid.Row="2" VerticalAlignment="Bottom" Width="75" Height="75" Margin="0,0,85,85" Background="#190000FF"/>
        <Button Click="AddDigit4" Content="4" HorizontalAlignment="Right" Grid.Row="2" VerticalAlignment="Bottom" Width="75" Height="75" Margin="0,0,235,160" Background="#190000FF"/>
        <Button Click="AddDigit5" Content="5" HorizontalAlignment="Right" Grid.Row="2" VerticalAlignment="Bottom" Width="75" Height="75" Margin="0,0,160,160" Background="#190000FF"/>
        <Button Click="AddDigit6" Content="6" HorizontalAlignment="Right" Grid.Row="2" VerticalAlignment="Bottom" Width="75" Height="75" Margin="0,0,85,160" Background="#190000FF"/>
        <Button Click="AddDigit7" Content="7" HorizontalAlignment="Right" Grid.Row="2" VerticalAlignment="Bottom" Width="75" Height="75" Margin="0,0,235,235" Background="#190000FF"/>
        <Button Click="AddDigit8" Content="8" HorizontalAlignment="Right" Grid.Row="2" VerticalAlignment="Bottom" Width="75" Height="75" Margin="0,0,160,235" Background="#190000FF"/>
        <Button Click="AddDigit9" Content="9" HorizontalAlignment="Right" Grid.Row="2" VerticalAlignment="Bottom" Width="75" Height="75" Margin="0,0,85,235" Background="#190000FF"/>
    </Grid>
</Page>
